package com.lovo.service.impl;

import com.lovo.bean.ClassBean;
import com.lovo.dao.IClassDAO;
import com.lovo.service.IClassService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class ClassServiceImpl implements IClassService {
    @Resource
    private IClassDAO classDAO;
    @Override
    @Transactional(propagation = Propagation.NESTED)
    public void add(ClassBean classBean) {
        classDAO.insert(classBean);
        int a = 100 / 0;
    }
}
